From be890e015c372a8dcd65fbc5246bf189fcc02fe1 Mon Sep 17 00:00:00 2001 From: Antigravity Date: Thu, 3 Sep 2026 14:35:00 +0200 Subject: [PATCH] Disable -fstack-protector on alpha architecture Forwarded: not-needed CMake hardcodes -fstack-protector-strong for GNU and Clang compilers, which overrides dpkg-buildflags and causes build failures on alpha. Gbp-Pq: Name alpha-no-fstack-protector.patch --- cmake/compilers/Clang.cmake | 5 ++++- cmake/compilers/GNU.cmake | 5 ++++- 2 files changed, 8 insertions(+), 2 deletions(-) diff --git a/cmake/compilers/Clang.cmake b/cmake/compilers/Clang.cmake index 3f9bdb5..5b58a2f 100644 --- a/cmake/compilers/Clang.cmake +++ b/cmake/compilers/Clang.cmake @@ -75,7 +75,10 @@ set(TBB_COMMON_COMPILE_FLAGS ${TBB_COMMON_COMPILE_FLAGS} -Wformat -Wformat-security -Werror=format-security $<$:-D_CRT_SECURE_NO_WARNINGS> $<$>:-fPIC> - $<$>:-fstack-protector-strong>) + ) +if (NOT CMAKE_SYSTEM_PROCESSOR MATCHES "alpha") + set(TBB_COMMON_COMPILE_FLAGS ${TBB_COMMON_COMPILE_FLAGS} $<$>:-fstack-protector-strong>) +endif() if (NOT APPLE AND NOT ANDROID_PLATFORM AND CMAKE_SYSTEM_PROCESSOR MATCHES "(AMD64|amd64|i.86|x86)" AND NOT WIN32) set(TBB_LIB_COMPILE_FLAGS ${TBB_LIB_COMPILE_FLAGS} -fstack-clash-protection) diff --git a/cmake/compilers/GNU.cmake b/cmake/compilers/GNU.cmake index 5fb8e5a..b15ffa0 100644 --- a/cmake/compilers/GNU.cmake +++ b/cmake/compilers/GNU.cmake @@ -109,7 +109,10 @@ endif () # Gnu flags to prevent compiler from optimizing out security checks set(TBB_COMMON_COMPILE_FLAGS ${TBB_COMMON_COMPILE_FLAGS} -fno-strict-overflow -fno-delete-null-pointer-checks -fwrapv) set(TBB_COMMON_COMPILE_FLAGS ${TBB_COMMON_COMPILE_FLAGS} -Wformat -Wformat-security -Werror=format-security - -fstack-protector-strong ) + ) +if (NOT CMAKE_SYSTEM_PROCESSOR MATCHES "alpha") + set(TBB_COMMON_COMPILE_FLAGS ${TBB_COMMON_COMPILE_FLAGS} -fstack-protector-strong) +endif() if (CMAKE_SYSTEM_PROCESSOR MATCHES "(AMD64|amd64|i.86|x86)" AND NOT EMSCRIPTEN) set(TBB_LIB_COMPILE_FLAGS ${TBB_LIB_COMPILE_FLAGS} $<$>:-fcf-protection=full>) endif () -- 2.30.2